Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

File.exists? is removed in Ruby 3.2 #150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

espen
Copy link

@espen espen commented Jan 8, 2023

@espen
Copy link
Author

espen commented Jan 8, 2023

Fixes #149

@tmbv93
Copy link

tmbv93 commented Apr 10, 2023

Great @espen!
Would love to get this merged, if this project is still active! =)

Copy link

@ai-sakib ai-sakib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ai-sakib
Copy link

ai-sakib commented Nov 9, 2023

Hello @nextmat , @bdehamer , @chancefeick and @pat ,

Could anyone please take steps to merge this PR soon. Or could you please suggest any alternative solution (gem) for the changes in this PR?

Thank you !
Asiful Islam Sakib
Software Engineer, WellDev

@jipiboily
Copy link

Hello @nextmat , @bdehamer , @chancefeick and @pat ,

Could anyone please take steps to merge this PR soon. Or could you please suggest any alternative solution (gem) for the changes in this PR?

Thank you ! Asiful Islam Sakib Software Engineer, WellDev

You can monkey patch this pretty easily:

# Removed in Ruby 3.2 but needed for librato (even most recent version as of today).
# Using this monkeypatch seems to make sense (for now).
# 
# https://github.com/librato/librato-rails/pull/150
class File
  def self.exists?(filename)
    self.exist?(filename)
  end
end

Not ideal, but will let you move on to some other things for now :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants